<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>站内信管理</title> <#include "/WEB-INF/content/module-index.html">
<script type="text/javascript">
var oper=[
      	{"id":"0","text":"未推送"},
      	{"id":"1","text":"已推送"}
      ];

$(function(){
	$("#search").click(function(){
		$("#grid").datagrid("reload",{"uid":$("#mobile").val()});			
	});	
});

function statusFormatter(value,rowData,rowIndex){
	if(value==0){
		return "正常";
	}else
		if(value==1){
			return "禁用";
		}else
			return "未知";
}

function sexFormatter(value,rowData,rowIndex){
	if(value==0){
		return "未设置";
	}else
		if(value==1){
			return "男";
		}else
			return "女";
}

function typeFormatter(value,rowData,rowIndex){
	if(value==0){
		return "身份证";
	}else
		if(value==1){
			return "驾驶证";
		}else
			return "未知";
}
</script>
<style>
a.btn-border{
	border: 1px solid #ccc;
}
</style>
</head>
<body>
<body class="easyui-layout">
	<div region="center" style="padding: 5px; background:#eee;">
		<div id="toolbar">	
			<label>手机号码:</label><input id="mobile"/>
			<a id="search" class="easyui-linkbutton" icon="icon-search" style="border: 1px solid #ccc" plain="true">搜索</a>
			<@auth code="membershipcard:card:new">
				<a id="new" class="easyui-linkbutton" onclick="javascript:add();" icon="icon-add" style="border: 1px solid #ccc" plain="true">新增</a>
			</@auth>
			<@auth code="membershipcard:card:*:edit">
				<a id="edit" class="easyui-linkbutton" onclick="javascript:edit();" icon="icon-tip" style="border: 1px solid #ccc" plain="true">编辑</a>
			</@auth>
		</div>
		<table id="grid" class="easyui-datagrid" url="query" align="center" idField="mid" rownumbers="true" striped="true" fitColumns="true" fit="true" pagination="true" singleSelect="true" toolbar="#toolbar">
			<thead>
				<tr>
					<th field="uid" width="20">所属用户</th>
					<th field="mtid" width="20">会员卡类型</th>
					<th field="balane" width="20">余额</th>
					<th field="idtype" width="20" formatter="typeFormatter">证件类型</th>
					<th field="idcard" width="20">证件号码</th>
					<th field="address" width="20">家庭住址</th>
					<th field="sex" width="20" formatter="sexFormatter">性别</th>
					<th field="birthday" width="20">出生日期</th>
					<th field="profession" width="20">职业</th>
					<th field="status" width="10" formatter="statusFormatter">状态</th>		 			
					<th field="creator" width="10">创建人</th>
					<th field="createtime" width="10" align='center'>创建时间</th>
				</tr>
			</thead>
		</table>
	</div>
</body>
</body>

</html>